import util from '../../../utils/util'
import {
  GetGriderList
} from '../../../config/api'

Page({

  /**
   * 页面的初始数据
   */
  data: {
    grider_list:[]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.getGriderList();
  },

  getGriderList() {
    let grider_storge = wx.getStorageSync('grider')
    
    let that = this;
    util.apiRequest(GetGriderList, { id: grider_storge.id }, null).then(r => {
      console.log('列表网格长下网格员：', r)
      that.setData({
        grider_list: r.data.data
      })
    })
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})